package com.blacktry.service.impl;

import com.blacktry.entity.blog.Labels;
import com.blacktry.entity.model.vueVO.Option;
import com.blacktry.mapper.blog.LabelsMapper;
import com.blacktry.service.LabelsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author blackTry
 * @since 2022-02-07
 */
@Service
public class LabelsServiceImpl extends ServiceImpl<LabelsMapper, Labels> implements LabelsService {
    @Override
    public void insertLable(Labels labels) {
        this.baseMapper.insert(labels);
    }

    @Override
    public Integer selectId(String labelName) {
        return this.baseMapper.selectId(labelName);
    }

    @Override
    public List<Option> selectLabelsOptions() {
        return this.baseMapper.selectLabelsOptions();
    }

    @Override
    public List<Option> selectOneLabelsOptions(String id) {
        return this.baseMapper.selectOneLabelsOptions(id);
    }

    @Override
    public String[] backOneLabelsOptions(String id) {
        return this.baseMapper.backOneLabelsOptions(id);
    }

    @Override
    public int deleteLableById(Integer labelId) {
        return this.baseMapper.deleteById(labelId);

    }
}
